<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
</head>

<body>
    <script type="text/javascript">
        let a = {
            "烟台": "2",
            "扬州": "2.4",
            "山西": "1.8",
            "陕西": "2.2",
            "北京": "2.3"
        };

        let l = prompt("请输入地区和月份");

        let region = l.split(" ")[0];

        let month = parseInt(l.split(" ")[1]);
        let base = a[region];
        let price;
        switch (region) {
            case "烟台":
                base = 2;
                break;
            case "扬州":
                base = 2.4;
                break;
            case "山西":
                base = 1.8;
                break;

            case "陕西":
                base = 2.2;
                break;
            case "北京":
                base = 2.3;
                break;
        }

        switch (month) {
            case 1:
            case 2:
            case 3:
            case 4:
                price = base * (1 + 0.2);
                break;
            case 5:
            case 6:
            case 7:
            case 8:
            case 9:
            case 10:
                price = base * (1 + 0.1);
                break;
            case 11:
            case 12:
                price = base * (1 + 0.15);
                break;
        }


        alert("苹果单价为：" + price + "元!");
    </script>
</body>

</html>